package schoolsource.gui;

public class Style {

    private String heightType = "pt";
    private int height = -1;
    private String widthType = "pt";
    private int width = -1;

	public Style(int newHeight, int newWidth) {
        height = newHeight;
        width = newWidth;
    }

    public void setHeightType(String newHeightType) {
        heightType = newHeightType;
    }

    public void setWidthType(String newWidthType) {
        widthType = newWidthType;
    }

    public String getHTMLStyleString() {
        String returnString = "";
        returnString += (-1 == height?"":";height:" + height + heightType + ";");
        returnString += (-1 == width?"":";width:" + width + widthType + ";");

        return returnString;
    }

    public String getWidth() {
        return (width-3) + widthType;
    }

    public String getHeight() {
        return height + heightType;
    }

}